
package results;

import objects.MobileStation;

/**
 * Monitors the battery level
 * 
 * @author Guillaume
 * @created June 7, 2004 
 */

public class ProbeEnergyBatteryLevel extends ProbeEnergy {

    /** Property name monitored by the probe */
    private static final String PROPERTY_NAME = "ProbeEnergyBatteryLevel";

    /** Probe description */
    private static final String PROBE_DESCRIPTION = "";
	

    /**
     * We assume the battery level changed whanever the mobile moves
     * So we consider the battery level probe belongs to the <code>DEPL_LOOP</code>
     * 
     * @param t
     * @param probeName probe name
     */
    public ProbeEnergyBatteryLevel(MobileStation t,String probeName) {
	super(DEPL_LOOP, t,probeName);
		
    }

    /** 
     * Get the battery level in percentage.
     * 
     * @see Objects.Station
     * @see Results.Probe#getValue()
     */
    protected Object getValue() {
	return new Double(((MobileStation) _linkedStation).getBatteryLevel());
    }

    /**
     * Get the property Name
     * @return property name
     * @see Results.Probe#getPropertyName()
     */
    public String getPropertyName() {
	return PROPERTY_NAME;
    }

    /**
     * Get the descitption of the probe
     * @return probe description
     * @see Results.Probe#getProbeDescription()
     */
    public String getProbeDescription() {
	return PROBE_DESCRIPTION;
    }

    public static void main(String[] args) {
    }
}
